package com.zqwh.xtool.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.zqwh.xtool.activity.InitActivity;

/**
 * Created by eason.yang on 2017/8/24.
 */
public class BootReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Intent start = new Intent(context, InitActivity.class);
        start.setAction("android.intent.action.MAIN");
        start.addCategory("android.intent.category.LAUNCHER");
        start.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP );
        context.startActivity(start);
    }
}
